// 导入localStorage
import { getToken, setToken } from "@/utils/storage";
export default {
  namespaced: true,
  state: {
    token: getToken(),
  },
  getters: {},
  mutations: {
    upDataToken(state, payload) {
      state.token = payload;
      // 提交修改时同步把token 给到本地存储
      setToken(payload);
    },
  },
  actions: {},
  modules: {},
};
